UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'CiRXp/QkOfk8Vdn46bs4xFQ+I6EVWtMvC36sF5VnhZU='
WHERE
key_id = 'fb7024fa722dc55cc7665be6127f8f0a1aa01d07d3b13e83fb7fa367f3a8258d'
AND (
token = 'CiRXp/QkOfk8Vdn46bs4xFQ+I6EVWtMvC36sF5VnhZU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)