UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MRxBtql5JjJjLAbLl7615dFeoSvy+qryS09+lv1Kmbw='
WHERE
key_id = 'b8fb07ff3b4bcf8e014a8516a3faba18f63524130cddc29df34bf195243e29af'
AND (
token = 'MRxBtql5JjJjLAbLl7615dFeoSvy+qryS09+lv1Kmbw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)