UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'p/2e6O9GIU4Sm+CJyk/0iuwpqBTz87cO/rm9wj/G6CM='
WHERE
key_id = '2b852b60a0b570820efbd0ae543490fc6db67828a2f36f98b876e68df58888ea'
AND (
token = 'p/2e6O9GIU4Sm+CJyk/0iuwpqBTz87cO/rm9wj/G6CM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)