UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VEILOP3hprrnRnVoKdXvecgjyU0M6zq9gmYoKvSnneg='
WHERE
key_id = '2230978ac22c853db1bb6565071c8ec5390ecdf34f88a7d1a4673f8d07cc28f9'
AND (
token = 'VEILOP3hprrnRnVoKdXvecgjyU0M6zq9gmYoKvSnneg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)