UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zIwRm1VGhH2tZZNrqPeUe9bZKVc19+CGOXBQFMT5ybQ='
WHERE
key_id = 'ef6124b08cc67809a1ac0adbf1eb36a79983a8a60780c2a35aaf4207c5d1bb0f'
AND (
token = 'zIwRm1VGhH2tZZNrqPeUe9bZKVc19+CGOXBQFMT5ybQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)