UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/oCFdKvaD264uvMD3R9zfPM2SxZ+gF2uC4UKzye2fYU='
WHERE
key_id = '488e3c1990bb4c553af81a4f0d37ed1f471f0cfd72e7476876ac9f9ab583731d'
AND (
token = '/oCFdKvaD264uvMD3R9zfPM2SxZ+gF2uC4UKzye2fYU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)