UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'qID/707Nms6M+4ugdB5IU+YxGwvme17NpMUtD6ZaP3s='
WHERE
key_id = 'e9d7496b4b181a0484b379b27e75b07b2cc73e8e9a9a5a4eaa6613a37ce8c465'
AND (
token = 'qID/707Nms6M+4ugdB5IU+YxGwvme17NpMUtD6ZaP3s='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)