UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2zQi28jWIhO3bJpDQ21zySgPhSOLb2Gu/FpgfP3gRfY='
WHERE
key_id = '066e2ad4345facf88d024528d8d44495d3c69b2e7bdaa27979f7c96ebbc9955b'
AND (
token = '2zQi28jWIhO3bJpDQ21zySgPhSOLb2Gu/FpgfP3gRfY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)