UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'bhSljOnLmG+a7FobrtT2cFZ9G8ZefiD/a139tYeSqOY='
WHERE
key_id = '37aa05db4cc46b85c77983df198f35b31b948f6c69cdfdad38f28d2a7a603e72'
AND (
token = 'bhSljOnLmG+a7FobrtT2cFZ9G8ZefiD/a139tYeSqOY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)