UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'QRvGnKLuKI4e9D2fWqEGZCjaw5EXadlNdYzHqD0/xso='
WHERE
key_id = '908d7ffc6d858d8dea5d07c6a247fda6bd2de682deac701912e69675b38b9f09'
AND (
token = 'QRvGnKLuKI4e9D2fWqEGZCjaw5EXadlNdYzHqD0/xso='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)