UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'cUe1peJ5RxgYuCdRGSpsn6gHMisugr/mxlzj1TU1UrQ='
WHERE
key_id = '281f7f6f64fec23071ad8d8b4d90f78edfdde044bd74cd027337be86acaade74'
AND (
token = 'cUe1peJ5RxgYuCdRGSpsn6gHMisugr/mxlzj1TU1UrQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)