UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'cMEDMl+KqEttVkQkDA9NaWN1sgqhBxs/eS0Mw6kmZek='
WHERE
key_id = '873e0c023d037495cfe15b7432db68ff1cb9ed8446dbe3eb3728d90d53f8a7e6'
AND (
token = 'cMEDMl+KqEttVkQkDA9NaWN1sgqhBxs/eS0Mw6kmZek='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)