UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jm/rbLM64tH3wH4w48xJSKpexB4QC3vF1gXnCv7ZgMw='
WHERE
key_id = '8d6a8027f0f683834c2da8ceb63d8b4339ccf1d7faf486a198ea8d5d56dc3dc5'
AND (
token = 'jm/rbLM64tH3wH4w48xJSKpexB4QC3vF1gXnCv7ZgMw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)