UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rhRh5LKUDAdo0HT4DZCG59wb4vRMJaMPE2zNWO1/Vo8='
WHERE
key_id = 'a642aa28cc84f98496689996577174ed4c512b6dc308dedbc5c319f659c597b0'
AND (
token = 'rhRh5LKUDAdo0HT4DZCG59wb4vRMJaMPE2zNWO1/Vo8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)