UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'VhhJdZ0YHajG4HxfDbJre9gviFLdv3PyJHw2P4HdYkA=' 
WHERE 
  key_id = '7672362d94a09f85bbb7392ab82e37d3f570c47bcc0c9ba9df55bd721ea42368' 
  AND (
    token = 'VhhJdZ0YHajG4HxfDbJre9gviFLdv3PyJHw2P4HdYkA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00049