UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'bOkqu73JqJmnATtlG1h242sFNZP+5fPtxqNcXlzJDFU=' 
WHERE 
  key_id = '9d4bb1661271087218a36902927d31931989ea156a511bc263ea7e362e792ddd' 
  AND (
    token = 'bOkqu73JqJmnATtlG1h242sFNZP+5fPtxqNcXlzJDFU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00041