UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/6612E/qRhEGRBklWs3cSOM5FH3VsxslP0buhMdH7jQ=' 
WHERE 
  key_id = '5b701f2880701b035cc18977f54f1be1afaa95eda5db98531f3b5a69d9990492' 
  AND (
    token = '/6612E/qRhEGRBklWs3cSOM5FH3VsxslP0buhMdH7jQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00041