UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+VQWHphsKL7qOALyM0nkahj2D1H5SxgkH7f01vMum7c='
WHERE
key_id = '94ffd9c8e5aac64e932c149ae9672f500a77f6922c888310b000bc21f5f5f675'
AND (
token = '+VQWHphsKL7qOALyM0nkahj2D1H5SxgkH7f01vMum7c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)