UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'AuTcC8NFohUfFAERmo9ErxqkzgtvrlpYLPv2VGi+6FA='
WHERE
key_id = 'dd52d06af723712a40e78d4a3bcd898cbfce0995c863524c27a30547a8576e90'
AND (
token = 'AuTcC8NFohUfFAERmo9ErxqkzgtvrlpYLPv2VGi+6FA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)