UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4roliDcg4IDOWDu+4diCcMfmk0NaQ3jx5tHfdlLZsaA='
WHERE
key_id = '896205a10da9e7eee7fb8a5484732119cb62ef5be61c1e416de4f5e5cfd981f4'
AND (
token = '4roliDcg4IDOWDu+4diCcMfmk0NaQ3jx5tHfdlLZsaA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)