UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Y5PZlJ58Cq0f9uf05VVrz9bUQW/Rg24vdqcDAwnhHBk='
WHERE
key_id = '75a7f70c1822ab02a20288a1525d4f27f250cf9875ad07f35176759ba80d60a4'
AND (
token = 'Y5PZlJ58Cq0f9uf05VVrz9bUQW/Rg24vdqcDAwnhHBk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)