UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'e1eQuV4YWASR3Mf7JDxb6ZIA3v7kl/OCi+QKI902BNg='
WHERE
key_id = '068a0d4ed4f3761f878d37c842214043065b056aa8ef58500c12b5f1d3c999e1'
AND (
token = 'e1eQuV4YWASR3Mf7JDxb6ZIA3v7kl/OCi+QKI902BNg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)