UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'VMxYBemFjXuehL6n5n+o9bjiLKWAH1V3Nlr41bkQ/pk=' 
WHERE 
  key_id = '923e83a90b49961aa106c23fb4382ac9efb6e4b75d1c1470b617c0bdcaaaf715' 
  AND (
    token = 'VMxYBemFjXuehL6n5n+o9bjiLKWAH1V3Nlr41bkQ/pk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00053