UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GFoXirNMOBxoJax/0w+f9XZQrcZBoFuNT4MqkD9aD6M='
WHERE
key_id = '594d38197dfb5fcc4683cf0175e4ee6f592139023de300cdd21d3ce0defe1185'
AND (
token = 'GFoXirNMOBxoJax/0w+f9XZQrcZBoFuNT4MqkD9aD6M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)