UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'KvDCmLCAhHGLgAi2zEe6NxW5yVOFjixFesyhofvaCzs=' 
WHERE 
  key_id = '92699373e8b5c3601f2ee40bb48ca97a3f0e0bd2505b36db3fe391003e39cbd7' 
  AND (
    token = 'KvDCmLCAhHGLgAi2zEe6NxW5yVOFjixFesyhofvaCzs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00036