UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/15lLWLIFxmm7MLRzPPOkVqmZJMphKZOyBqAhtGn2KY='
WHERE
key_id = '094f9a238960dc2c7694aabb33b936280d97f356f1c8dcab6cd6a95c866e77de'
AND (
token = '/15lLWLIFxmm7MLRzPPOkVqmZJMphKZOyBqAhtGn2KY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)