UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '8Hmu4/T//yu9DAbzDWDIw3G5hO/c13IfUr25OKD9SNM='
WHERE
key_id = '8c8a945b308714d3d05b75b6a4379bfd013b03a7a19b9811fa0b67c09d1c5149'
AND (
token = '8Hmu4/T//yu9DAbzDWDIw3G5hO/c13IfUr25OKD9SNM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)