UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'qc37o7b0VMzz3AiZQSnDBKr/YNAjV+H4bxp6/JBgkJI='
WHERE
key_id = '70d9b17077c690ba1b79a37bb50c228aa7fa4251e558e20bb4a6f4bd22937637'
AND (
token = 'qc37o7b0VMzz3AiZQSnDBKr/YNAjV+H4bxp6/JBgkJI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)