UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'CibZjJab+IBR1OTpjndp64tLQOBadbgky966jf6WY/A=' 
WHERE 
  key_id = 'bc2d93e62d44f75c368ace183b7d13c89df4b874ac7249c7da5bfdebc13c6f5f' 
  AND (
    token = 'CibZjJab+IBR1OTpjndp64tLQOBadbgky966jf6WY/A=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035