UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'bVxUoD4HRXwFFef+irNcmaR3e8prsXmhM2oPHrXWljU=' 
WHERE 
  key_id = '368c68c3ae2756ed40ffc17412e73c1b3bd84c3ac7043e24544511b9ec31ca52' 
  AND (
    token = 'bVxUoD4HRXwFFef+irNcmaR3e8prsXmhM2oPHrXWljU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00023