UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VHclhKDR65kLf69RSk80KKGuFQvkOZCRVt7oxQ20SYE='
WHERE
key_id = '2abf83ec724e01f8fa4a578537980b95ef5295fcec22470b717cc2898ae6cafc'
AND (
token = 'VHclhKDR65kLf69RSk80KKGuFQvkOZCRVt7oxQ20SYE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)