UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'eLMZJIc+CPP9XvHsTj9021XBTk6+tyGYkXkpogd0Blk=' 
WHERE 
  key_id = 'ddcfe19198f404340817b35240b371f769c2af18bd5bf8b7ffe1632b162b3e86' 
  AND (
    token = 'eLMZJIc+CPP9XvHsTj9021XBTk6+tyGYkXkpogd0Blk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027