UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'AwaUtBv9xJ+8QkNTbrQujVTQYtAGbrp0zH8oqo/73OI='
WHERE
key_id = '659fb3f7eabf58a7a04ff4918324fdbc2ac8857f4efaf768d92b1f47b13e0801'
AND (
token = 'AwaUtBv9xJ+8QkNTbrQujVTQYtAGbrp0zH8oqo/73OI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)