UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'mzouIp9UdtrLYw7rzfOloOHClTS3suUjvN9a3m2iJQU='
WHERE
key_id = 'ef0c430c0a276325be2431079e0be50d0a69f79583bde284c8eea6ae1da28382'
AND (
token = 'mzouIp9UdtrLYw7rzfOloOHClTS3suUjvN9a3m2iJQU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)