UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7ef1VusMMCvWSWJRwJ5tYJZvaF7E7+QcSuoGoS9KFtQ='
WHERE
key_id = '6817cd5992914d2f4b06ae800b1d44fe02b66c357aeeb196aa8b6d3ee439b872'
AND (
token = '7ef1VusMMCvWSWJRwJ5tYJZvaF7E7+QcSuoGoS9KFtQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)